home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
404 Jogos
/
CLJG.iso
/
Acao
/
BlueCustom.swf
/
scripts
/
frame_630
/
PlaceObject2_324_127
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
next >
Wrap
Text File
|
2008-09-25
|
1KB
|
38 lines
onClipEvent(enterFrame){
yit = Math.floor(Math.random() * 91) + 30;
if(this._x < -2500)
{
this._x = 2900;
this._y = _root.depth._y + 2020 + yit;
die = 1;
this.gotoAndPlay(1);
}
if(this._x > 3000)
{
this._x = -2400;
this._y = _root.depth._y + 2020 + yit;
die = 1;
this.gotoAndPlay(1);
}
this._x += _global.xgo;
this._y += _global.ygo;
if(die == 1)
{
myRadians = Math.atan2(this._y - _root.player._y,this._x - _root.player._x);
xleg = this._x - _root.player._x;
yleg = this._y - _root.player._y;
scared = Math.sqrt(xleg * xleg + yleg * yleg);
}
if(_root.player.eat.hitTest(this.eat))
{
die = 0;
this.gotoAndPlay("die");
_global.boom = 1;
scoreity = 50;
_root.tools.instascore.text = "+" + scoreity;
_root.tools.instblock._alpha = 0;
_global.scoreit += 50;
_root.tools.bar1.gotoAndStop(_global.boost + 1);
}
}